package controllers;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.Controller;

public class JohnController implements Controller{

	@Override
	public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response) throws Exception {
		System.out.println("hello john....");
		ModelAndView mv=new ModelAndView();
		mv.addObject("uname", "Johnyu");
		mv.addObject("age", 100);
		mv.setViewName("success");
		
		return mv;
	}

}
